package adv330;
import java.io.*;
/**
 * 获得文件的绝对路径和相对路径
 * @author oldliu
 * @since 1.0
 */
public class FileTest4 {
    public static void main(String[] args) throws IOException {
        //File f=new File("");
        //File f=new File("java高级\\src\\adv330\\FileTest4.java");
       //相对路径
        File f=new File("../zhouliu/java基础/src/Bank.java");

        //绝对路径
        System.out.println("真实路径："+f.getCanonicalPath());
        System.out.println(f.getAbsolutePath());
        System.out.println(f.length()+"字节");
    }
}
